﻿@{
    int columnId = Html.CurrentColumnId();
    dynamic infoData = Html.InfoData();
    dynamic prevData = Html.InfoDataPrevious("columnid=@columnId",new{columnId = columnId});
    dynamic nextData = Html.InfoDataNext("columnid=@columnId", new{columnId =columnId});
}

<div class="container padding-top-20">
    <div class="row">
        <div class="col-md-3">
            @Html.Partial("subNavPartial")
        </div>
        <div class="col-md-9">
            @Html.Partial("BreadcrumbPartial")
            <div class="info-content">
                <h4 class="text-center line-height-3">@infoData.Title</h4>
                <div class="text-center">
                    <span title="发布时间" class="margin-right-20"><i class="fa fa-clock-o"></i> @infoData.Thedate.ToString("yyyy-MM-dd")</span>
                    <span title="点击数"><i class="fa fa-eye"></i> <span id="lb_clicks">0</span></span>
                </div>
                <div class="info-content padding-top-20" id="Content">
                    @Html.Raw(infoData.Content)
                </div>
            </div>

            <div class="clearfix padding-top-20 line-height-2">
                <ul>
                    @if (prevData != null)
                    {
                        string url = Html.InfoDataUrl((int)prevData.ColumnId, (int)prevData.Id);
                        <li class="text-gray">上一篇：<a href="@url">@prevData.Title</a></li>
                    }
                    @if (nextData != null)
                    {
                        string url = Html.InfoDataUrl((int)nextData.ColumnId, (int)nextData.Id);
                        <li class="text-gray">下一篇：<a href="@url">@nextData.Title</a></li>
                    }
                </ul>
            </div>

        </div>
    </div>
</div>


<script type="text/javascript">
    var $lb_clicks = $("#lb_clicks");
    $.post("/E/InfoData/AddClicks", { ColumnId:@infoData.ColumnId,Id:@infoData.Id}, function (data) { $lb_clicks.text(data)})
</script>
